Manually Backup and Restore Apis Foundation configuration
Current version is 64 bit, but we include this to show how to upgrade from 32-bit to 64-bit.
A secure method to copy Apis Hive configuration from one computer to another, or simply have a backup of the configuration, is to copy the configuration files and registry settings. By using this method, copying and restore of configurations can be automated by scripting.
This method requires basic knowledge to Windows registry settings, how to export and import Windows registry keys.
The configuration location
The procedure varies slightly depending on the bitness (32/64) of the operating system and Apis Foundation. There are mainly 3 configuration storage types; registry, binary files and xml configuration files.
The location of registry Apis configuration
The registry holds information regarding basic functionality of ApisHive, HoneyStore and configuration file location of module configuration.
- The location of registry Apis configuration:
HKEY\_LOCAL\_MACHINE\SOFTWARE\Prediktor
- 32-bit application on 64-bit operating system:
HKEY\_LOCAL\_MACHINE\SOFTWARE\WOW6432Node\Prediktor
Apis module configuration files
These files hold information regarding module property, and items, default the file name is the same as the module/database name:
.acd Module binary configuration file (old format) .ans Module binary configuration file .acdb Database binary configuration file (old format) .ansdb Database binary configuration file
The default location of Apis module configuration:
<Install Directory>\Config\<INSTANCENAME>
Module configuration files<Install Directory>\Config\ApisHoneyStore
Database configuration files
Event Historian
If Event Historian (Chronical) is enabled the configuration is stored by default in
<Install Directory>\Chronical\<INSTANCENAME>
Apis servers xml configuration files
These files hold information regarding advanced functionality of ApisHive and HoneyStore not found in the registry.
64-bit Apis Foundation
<Install Directory>\Bin64
ApisHiveX64.exe.config
ApisHiveX64.AppSettings.config
ApisHoneystoreX64.exe.config
ApisHoneystoreX64.AppSettings.config
32-bit Apis Foundation:
<Install Directory>\Bin
ApisHiveX64.exe.config
ApisHiveX64.AppSettings.config
ApisHoneystoreX64.exe.config
ApisHoneystoreX64.AppSettings.config
Upgrade paths
From Operating system bitness | To Operating system bitness | From Apis Foundation bitness | To Apis Foundation bitness | Copy procedure | Restore procedure |
---|---|---|---|---|---|
32 | 64 | 32 | 64 | C1 (see below) | R6 (see below) |
64 | 64 | 32 | 64 | C2 (see below) | R8 (see below) |
64 | 64 | 64 | 64 | C3 (see below) | R9 (see below) |
Copy Apis Hive configuration
-
Copy 32-bit Apis Hive configuration on 32-bit operating system
-
Copy all files from
<Install Directory>\Config
and if Event Historian (Chronical) is enabled copy all files from<Install Directory>\Chronical\<INSTANCENAME>
-
Copy
ApisHive.AppSettings.config
andApisHive.exe.config
from<Install Directory>\Bin
-
Export the registry key:
HKEY\_LOCAL\_MACHINE\SOFTWARE\Prediktor\Apis\<INSTANCENAME>
to a file.
-
-
Copy 32-bit Apis Hive configuration on 64-bits-bit operating system
-
Copy all files from
<Install Directory>\Config
and if Event Historian (Chronical) is enabled copy all files from<Install Directory>\Chronical\<INSTANCENAME>
-
Copy
ApisHive.AppSettings.config
andApisHive.exe.config
from<Install Directory>\Bin
-
Export the registry key:
HKEY\_LOCAL\_MACHINE\SOFTWARE\Wow6432Node\Prediktor\Apis\<INSTANCENAME>
to a file.
-
-
Copy 64-bit Apis Hive configuration
-
Copy all files from
<Install Directory>\Config
and if Event Historian (Chronical) is enabled copy all files from<Install Directory>\Chronical\<INSTANCENAME>
-
Copy
ApisHiveX64.AppSettings.config
andApisHiveX64.exe.config
from<Install Directory>\Bin64
-
Export the registry key:
HKEY\_LOCAL\_MACHINE\SOFTWARE\Prediktor\Apis\<INSTANCENAME>
to a file.
Restore Apis Hive configuration
If the
directory on the destination computer is different from the source computer, the registry settings export file must be changed: In the exported registry script file, locate where Apis Hive configuration was initially installed the "ApisStorageSource" string value, for instance where system was initially installed in
C:\Program Files (x86)\APIS
and is copied / moved toC:\Program Files\APIS
:[HKEY\_LOCAL\_MACHINE\SOFTWARE\Wow6432Node\Prediktor\Apis\ApisHive\Modules\ApisWorker]
@="{983B4AE2-ABB9-11D2-9424-00608CF4C421}"
"ProgIDOfModule"="Prediktor.ApisWorker.1"
"ApisStorageClass"="{4C854C93-C667-11D2-944B-00608CF4C421}"
"ApisStorageSource"="C:\Program Files (x86)\APIS\Config\ApisHive\Worker.ans"
Replace all occurrences of the original location to new location, for instance:
[HKEY\_LOCAL\_MACHINE\SOFTWARE\Wow6432Node\Prediktor\Apis\ApisHive\Modules\ApisWorker\
@="{983B4AE2-ABB9-11D2-9424-00608CF4C421}"
"ProgIDOfModule"="Prediktor.ApisWorker.1"
"ApisStorageClass"="{4C854C93-C667-11D2-944B-00608CF4C421}"
"ApisStorageSource"="C:\Program Files\APIS\Config\ApisHive\Worker.ans"
-
-
Restore 32-bit Apis Hive configuration from 32-bit operating system to 64-bit bits operating system as 64-bit Apis Hive configuration.
-
Install Apis Foundation 64
-
Create new instance if not using default.
-
Copy all files (restore) (1.a) to
<Install Directory>\Config
and possibly<Install Directory>\Chronical\<INSTANCENAME>
-
Compare the settings of
ApisHive.AppSettings.config
andApisHive.exe.config
from the 32-bit source system (1.b) with the 64-bitApisHiveX64.exe.config
andApisHiveX64.AppSettings.config
on the destination system in<Install Directory>\Bin64
. If the settings are different do necessary changes in the 64-bit files.
-
-
Restore 32-bit Apis Hive configuration from 64-bit operating system to 64-bit bits operating system as 64-bit Apis Hive configuration.
-
Install Apis Foundation 64
-
Create new instance if not using default.
-
Copy all files (restore) (2.a) to
<Install Directory>\Config
and possibly<Install Directory>\Chronical\<INSTANCENAME>
-
Compare the settings of
ApisHive.AppSettings.config
andApisHive.exe.config
from the 32-bit source system (2.b) with the 64-bitApisHiveX64.exe.config
andApisHiveX64.AppSettings.config
on the destination system in<Install Directory>\Bin64
. If the settings are different do necessary changes in the 64-bit files. -
Edit the registry script (2.c)
-
Replace all
SOFTWARE\Wow6432Node\Prediktor
withSOFTWARE\Prediktor
-
Save
-
-
Run the modified registry script.
-
-
Restore 64-bit Apis Hive configuration from 64-bit operating system to 64-bit operating system as 64-bit Apis Hive configuration.
Manually copy / move Apis Honey Store database
A secure bulletproof method to copy Apis Honeystore data from one computer to another, or simply take backup/copy of the configuration, the disadvantage is that the database must be taken offline.
Example; common user case:
Migration of ApisFoundation to new hardware from Server1
to Server2
-
Assume we have database named “RedLogger” this is located in
C:\APIS\DBs
onServer1
-
Assume ApisFoundation is installed in same location on both computers
C:\APIS\
During migration to Server2
we want to move the location of the “RedLogger” database, to E:\DBs
-
Assure ApisHoneyStore service is stopped on
Server1
andServer2
-
Copy
C:\APIS\Config\ApisHoneyStore\RedLogger.ansb
fromServer1
toC:\APIS\Config\ApisHoneyStore
onServer2
-
Copy the
RedLogger.dat
andRedLogger.cache
files fromC:\APIS\DBs
onServer1
toE:\DBs
onServer2
-
On Server1 export the registry key:
HKEY\_LOCAL\_MACHINE\SOFTWARE\Prediktor\Apis\ApisHoneyStore\Databases\RedLogger
to a file -
Copy the registry script file to
Server2
and run it. (If ApisFoundation is installed in different location than Server1 theConfigFile
String Value in the registry script must be altered.) -
Assure you have a backup of the file
C:\APIS\Config\ApisHoneyStore\RedLogger.ansb
-
Edit the location of the database in the configuration file, there are two options (tools); offline ApisStructuredStorageViewer and online MMC Snapin:
-
Offline:
-
Start
ApisStructuredStorageViewer.exe
(a part of APIS_x_x_x-Tools) -
Open the
C:\APIS\Config\ApisHoneyStore\RedLogger.ansb
-
Change the
Attrib ID 20
fromC:\APIS\DBs
toE:\DBs
-
The migration of the database is now finished and ApisHoneyStore can be started on
Server2
-
-
Online:
-
Start ApisHoneyStore service
-
From ApisBuddy start ApisHoneyStore MMC snapin
-
Navigate to RedLogger database right click and select Administer database
-
In RedLogger properties dialog change
DataDirPath
fromC:\APIS\DBs\RedLogger.dat\
toE:\DBs\RedLogger.dat\
andCachePath
fromC:\APIS\DBs\
toE:\DBs\
-
The migration of the database is now finished
-